<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="Restoring a Kingbase Instance">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="kingbase-00041.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="30-OceanProtect Appliance 1.5.0-1.6.0 Help Center">
  <meta name="DC.Publisher" content="20241029">
  <meta name="prodname" content="csbs">
  <meta name="documenttype" content="usermanual">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="kingbase-00044">
  <meta name="DC.Language" content="en-us">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>Restoring a Kingbase Instance</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="kingbase-00044"></a><a name="kingbase-00044"></a>
  <h1 class="topictitle1">Restoring a Kingbase Instance</h1>
  <div>
   <p>This section describes how to restore a Kingbase instance that has been backed up to the original location or a new location.</p>
   <div class="section">
    <h4 class="sectiontitle">Context</h4>
    <p>Backup and replication copies can be used for restoration. Restoration to the original location or a new location is supported. Replication copies cannot be used for restoration to the original location.</p>
   </div>
   <div class="section">
    <h4 class="sectiontitle">Procedure</h4>
    <ol>
     <li><span>Choose <span class="uicontrol" id="kingbase-00044__en-us_topic_0000001839142377_uicontrol1459541416277"><b><span id="kingbase-00044__en-us_topic_0000001839142377_text1459512149272"><strong>Explore</strong></span> &gt; <span id="kingbase-00044__en-us_topic_0000001839142377_text185956147273"><strong>Copy Data</strong></span> &gt; <span id="kingbase-00044__en-us_topic_0000001839142377_text1647174044920"><strong>Databases</strong></span> &gt; Kingbase</b></span>.</span></li>
     <li><span>You can search for copies by Kingbase instance resource or copy. This section describes how to search for copies by resource.</span><p></p><p>On the <span class="uicontrol"><b><span><strong>Resources</strong></span></b></span> tab page, locate the resource to be recovered by resource name and click the name.</p> <p></p></li>
     <li><span>Select the resource for copy-based restoration.</span></li>
     <li><span>Specify a copy or a point in time for restoration.</span><p></p>
      <ul>
       <li>Restoration using a specified copy
        <ol type="a">
         <li>Select the year, month, and day in sequence to find the copy.<p>If <span><img src="en-us_image_0000001983276888.png"></span> is displayed below a month or date, copies exist in the month or date.</p></li>
         <li>Click <span><img src="en-us_image_0000002019876729.png"></span> to go to the <strong>Copy Data</strong> page.</li>
         <li>On the <strong>Copy Data</strong> page, click <span><img src="en-us_image_0000002087832932.png"></span> and choose <span class="menucascade"><b><span class="uicontrol"><span><strong>More</strong></span></span></b> &gt; <b><span class="uicontrol"><span><strong>Restore</strong></span></span></b></span> in the row where the desired copy is located.</li>
        </ol></li>
       <li>Restoration to a specified point in time
        <ol type="a">
         <li>Select the year, month, and day in sequence to find the copy.<p>If <span><img src="en-us_image_0000002019996265.png"></span> is displayed under a month or date, copies exist in the month or date.</p></li>
         <li>Click <span><img src="en-us_image_0000001983276892.png"></span> to go to the <strong>Copy Data</strong> page.</li>
         <li>On the <strong>Copy Data</strong> page, click <span><img src="en-us_image_0000002019876733.png"></span>. In the blue part on the timeline, select a copy and choose <span class="menucascade"><b><span class="uicontrol"><span><strong>More</strong></span></span></b> &gt; <b><span class="uicontrol"><span><strong>Restore</strong></span></span></b></span>.
          <div class="note">
           <img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span>
           <div class="notebody">
            <ul id="kingbase-00044__oracle_gud_0058_ul75802612312">
             <li id="kingbase-00044__oracle_gud_0058_li1497342618234">For 1.5.0, a maximum of 100 copies can be displayed on the timeline. You can click <span><img id="kingbase-00044__oracle_gud_0058_image173544102299" src="en-us_image_0000001886153709.png"></span> to view all copies.</li>
             <li id="kingbase-00044__oracle_gud_0058_li95818264231">During point-in-time recovery, the information about the copy used for restoration cannot be obtained on the management page. Therefore, users cannot view the copy information of the restoration job on pages of the restoration job and related events.</li>
            </ul>
           </div>
          </div></li>
        </ol></li>
      </ul> <p></p></li>
     <li><span>Recover data to a specified point in time or using a specified copy.</span><p></p>
      <div class="p">
       <a href="#kingbase-00044__table194961441141219">Table 1</a> describes the related parameters. 
       <div class="tablenoborder">
        <a name="kingbase-00044__table194961441141219"></a><a name="table194961441141219"></a>
        <table cellpadding="4" cellspacing="0" summary="" id="kingbase-00044__table194961441141219" frame="border" border="1" rules="all">
         <caption>
          <b>Table 1 </b>Parameters for restoring a Kingbase instance
         </caption>
         <colgroup>
          <col style="width:32.019999999999996%">
          <col style="width:67.97999999999999%">
         </colgroup>
         <thead align="left">
          <tr>
           <th align="left" class="cellrowborder" valign="top" width="32.019999999999996%" id="mcps1.3.3.2.5.2.1.2.2.3.1.1"><p>Parameter</p></th>
           <th align="left" class="cellrowborder" valign="top" width="67.97999999999999%" id="mcps1.3.3.2.5.2.1.2.2.3.1.2"><p>Description</p></th>
          </tr>
         </thead>
         <tbody>
          <tr>
           <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.3.2.5.2.1.2.2.3.1.1 "><p><span><strong>Restore To</strong></span></p></td>
           <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.3.2.5.2.1.2.2.3.1.2 "><p>Select either <span class="uicontrol"><b><span><strong>Original location</strong></span></b></span> or <span class="uicontrol"><b><span><strong>New location</strong></span></b></span>.</p></td>
          </tr>
          <tr>
           <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.3.2.5.2.1.2.2.3.1.1 "><p><span><strong>Location</strong></span></p></td>
           <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.3.2.5.2.1.2.2.3.1.2 "><p>If you set <strong>Restore To</strong> to <span class="uicontrol"><b><span><strong>Original location</strong></span></b></span>, the location of the current instance is displayed by default.</p></td>
          </tr>
          <tr>
           <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.3.2.5.2.1.2.2.3.1.1 "><p><span><strong>Target Host</strong></span></p></td>
           <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.3.2.5.2.1.2.2.3.1.2 "><p>Specify the target host, which is mandatory if you set <strong>Restore To</strong> to <span class="uicontrol"><b><span><strong>New location</strong></span></b></span>.</p></td>
          </tr>
          <tr>
           <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.3.2.5.2.1.2.2.3.1.1 "><p><span><strong>Target Instance</strong></span></p></td>
           <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.3.2.5.2.1.2.2.3.1.2 "><p>Specify the target instance, which is mandatory if you set <strong>Restore To</strong> to <span class="uicontrol"><b><span><strong>New location</strong></span></b></span>.</p></td>
          </tr>
          <tr>
           <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.3.2.5.2.1.2.2.3.1.1 "><p><span><strong>Parallel Processes</strong></span></p>
            <div class="note">
             <span class="notetitle"> NOTE: </span>
             <div class="notebody">
              <p>This parameter is supported only in 1.6.0 and later versions.</p>
             </div>
            </div></td>
           <td class="cellrowborder" valign="top" width="67.97999999999999%" headers="mcps1.3.3.2.5.2.1.2.2.3.1.2 ">
            <div class="p">
             Maximum number of processes that can run concurrently.
             <ul id="kingbase-00044__kingbase-00013_ul441812321262">
              <li id="kingbase-00044__kingbase-00013_li168933916267">An appropriate value for this parameter can improve the backup or restoration efficiency. If this parameter is set to a large value, the database instance performance will be affected.</li>
              <li id="kingbase-00044__kingbase-00013_li9418632172612">You are advised to set the maximum number of processes to the number of CPU cores.</li>
             </ul>
            </div> <p></p></td>
          </tr>
          <tr>
           <td class="cellrowborder" valign="top" width="32.019999999999996%" headers="mcps1.3.3.2.5.2.1.2.2.3.1.1 "><p><span><strong>Script to Run Before Restoration</strong></span></p></td>
           <td class="cellrowborder" rowspan="3" valign="top" width="67.97999999999999%" headers="mcps1.3.3.2.5.2.1.2.2.3.1.2 "><p>You can execute a self-defined script before a recovery job is executed or after it succeeds or fails, all based on your needs. Enter a script name that ends with <strong>.sh</strong>.</p>
            <div class="p">
             Ensure that the script is stored in the <strong>DataBackup/ProtectClient/ProtectClient-E/sbin/thirdparty</strong> directory on the database host and the user (user <strong>root</strong> by default) who has logged in to the database host is permitted to execute the script.
             <div class="note">
              <span class="notetitle"> NOTE: </span>
              <div class="notebody">
               <p>If <span class="uicontrol"><b><span><strong>Script to Run upon Restoration Success</strong></span></b></span> is configured, the status of the restoration job is displayed as <span class="uicontrol"><b><span><strong>Succeeded</strong></span></b></span> on the <span>product</span> even if the script fails to be executed. Check whether the job details contain a message indicating that the post-processing script fails to be executed. If yes, modify the script in a timely manner.</p>
              </div>
             </div>
            </div></td>
          </tr>
          <tr>
           <td class="cellrowborder" valign="top" headers="mcps1.3.3.2.5.2.1.2.2.3.1.1 "><p><span><strong>Script to Run upon Restoration Success</strong></span></p></td>
          </tr>
          <tr>
           <td class="cellrowborder" valign="top" headers="mcps1.3.3.2.5.2.1.2.2.3.1.1 "><p><span><strong>Script to Run upon Restoration Failure</strong></span></p></td>
          </tr>
         </tbody>
        </table>
       </div>
      </div> <p></p></li>
     <li><span>Click <span class="uicontrol"><b>OK</b></span>.</span></li>
    </ol>
   </div>
  </div>
  <div>
   <div class="familylinks">
    <div class="parentlink">
     <strong>Parent topic:</strong> <a href="kingbase-00041.html">Restoration</a>
    </div>
   </div>
  </div>
 </body>
</html>